package com.d0325;

public class PrintArrayTest {
    //泛型方法
    public static<E> void pringtArray(E[]arrs){
            for (E i:arrs
            ) {
            System.out.println(i);
        }
    }
    /*public static void pringtArray(Integer[]arrs){
        for (Integer i:arrs
        ) {
            System.out.println(i);
        }
    }
    public static void pringtArray(Double[]arrs){
        for (Double i:arrs
        ) {
            System.out.println(i);
        }
    }*/

    public static void main(String[] args) {
        Integer[]intArrs={1,2,3,4,5};
        String[]strArrs={"ab","cd","ef"};
        Double[]douArrs={1.1,1.2,1.3,1.4};

        pringtArray(intArrs);
        pringtArray(douArrs);
        pringtArray(strArrs);
    }

}
